3.273 \(\int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx\)

Optimal. Leaf size=39 \[ -\frac {a \cos ^{m+1}(c+d x)}{d (m+1)}-\frac {b \cos ^m(c+d x)}{d m} \]

[Out]

-b*cos(d*x+c)^m/d/m-a*cos(d*x+c)^(1+m)/d/(1+m)

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {4377, 12, 2565, 30} \[ -\frac {a \cos ^{m+1}(c+d x)}{d (m+1)}-\frac {b \cos ^m(c+d x)}{d m} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^m*(a*Sin[c + d*x] + b*Tan[c + d*x]),x]

[Out]

-((b*Cos[c + d*x]^m)/(d*m)) - (a*Cos[c + d*x]^(1 + m))/(d*(1 + m))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 4377

Int[(u_)*((v_) + (d_.)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_.)), x_Symbol] :> With[{e = FreeFactors[Cos[c*(a +
b*x)], x]}, Int[ActivateTrig[u*v], x] + Dist[d, Int[ActivateTrig[u]*Sin[c*(a + b*x)]^n, x], x] /; FunctionOfQ[
Cos[c*(a + b*x)]/e, u, x]] /; FreeQ[{a, b, c, d}, x] &&  !FreeQ[v, x] && IntegerQ[(n - 1)/2] && NonsumQ[u] &&
(EqQ[F, Sin] || EqQ[F, sin])

Rubi steps

\begin {align*} \int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx &=a \int \cos ^m(c+d x) \sin (c+d x) \, dx+\int b \cos ^{-1+m}(c+d x) \sin (c+d x) \, dx\\ &=b \int \cos ^{-1+m}(c+d x) \sin (c+d x) \, dx-\frac {a \operatorname {Subst}\left (\int x^m \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {a \cos ^{1+m}(c+d x)}{d (1+m)}-\frac {b \operatorname {Subst}\left (\int x^{-1+m} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {b \cos ^m(c+d x)}{d m}-\frac {a \cos ^{1+m}(c+d x)}{d (1+m)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 35, normalized size = 0.90 \[ -\frac {\cos ^m(c+d x) (a m \cos (c+d x)+b m+b)}{d m (m+1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^m*(a*Sin[c + d*x] + b*Tan[c + d*x]),x]

[Out]

-((Cos[c + d*x]^m*(b + b*m + a*m*Cos[c + d*x]))/(d*m*(1 + m)))

________________________________________________________________________________________

fricas [A]  time = 0.52, size = 35, normalized size = 0.90 \[ -\frac {{\left (a m \cos \left (d x + c\right ) + b m + b\right )} \cos \left (d x + c\right )^{m}}{d m^{2} + d m} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^m*(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

-(a*m*cos(d*x + c) + b*m + b)*cos(d*x + c)^m/(d*m^2 + d*m)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (a \sin \left (d x + c\right ) + b \tan \left (d x + c\right )\right )} \cos \left (d x + c\right )^{m}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^m*(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="giac")

[Out]

integrate((a*sin(d*x + c) + b*tan(d*x + c))*cos(d*x + c)^m, x)

________________________________________________________________________________________

maple [A]  time = 0.09, size = 40, normalized size = 1.03 \[ -\frac {b \left (\cos ^{m}\left (d x +c \right )\right )}{d m}-\frac {a \left (\cos ^{1+m}\left (d x +c \right )\right )}{d \left (1+m \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^m*(a*sin(d*x+c)+b*tan(d*x+c)),x)

[Out]

-b*cos(d*x+c)^m/d/m-a*cos(d*x+c)^(1+m)/d/(1+m)

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 36, normalized size = 0.92 \[ -\frac {\frac {a \cos \left (d x + c\right )^{m + 1}}{m + 1} + \frac {b \cos \left (d x + c\right )^{m}}{m}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^m*(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

-(a*cos(d*x + c)^(m + 1)/(m + 1) + b*cos(d*x + c)^m/m)/d

________________________________________________________________________________________

mupad [B]  time = 0.98, size = 35, normalized size = 0.90 \[ -\frac {{\cos \left (c+d\,x\right )}^m\,\left (b+b\,m+a\,m\,\cos \left (c+d\,x\right )\right )}{d\,m\,\left (m+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^m*(a*sin(c + d*x) + b*tan(c + d*x)),x)

[Out]

-(cos(c + d*x)^m*(b + b*m + a*m*cos(c + d*x)))/(d*m*(m + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a \sin {\left (c + d x \right )} + b \tan {\left (c + d x \right )}\right ) \cos ^{m}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**m*(a*sin(d*x+c)+b*tan(d*x+c)),x)

[Out]

Integral((a*sin(c + d*x) + b*tan(c + d*x))*cos(c + d*x)**m, x)

________________________________________________________________________________________